package com.waves.core.constant.redis;

/**
 * 任务RedisKey常量
 *
 * @author dlw
 */
public class TaskRedisKey {

    private static final String BASE_KEY = "task:";

    /**
     * 任务点赞
     */
    public static final String TASK_LIKED_SET = "liked:uid_%d";

    /**
     * 任务收藏
     */
    public static final String TASK_COLLECTED_SET = "collected:uid_%d";

    /**
     * 任务数量
     */
    public static final String TASK_RECEIVE_NUM = "receive:num:id_%d";

    public static final String TASK_RECEIVE_USER = "receive:uid_%d";

    public static final String TASK_RECEIVE_USER_LIST = "receive:uidList_%d";

    /**
     * 任务评论点赞
     */
    public static final String TASK_COMMENT_LIKED_SET = "comment:liked:uid_%d";


    public static String getKey(String key, Object... objects) {
        return BASE_KEY + String.format(key, objects);
    }

}
